﻿using DapperExtensions;
using Nova_DAL;
using Nova_MOD;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nova_BLL
{
    public class TMaterialGroupInfoBll
    {
        private readonly TMaterialGroupInfoDal dal = new TMaterialGroupInfoDal();

        public List<TMaterialGroupInfo> GetList()
        {
            return dal.GetList();
        }

        public List<TMaterialGroupInfo> GetListByGroupType(int groupType)
        {
            var predicate = Predicates.Field<TMaterialGroupInfo>(t => t.MaterialGroupType, Operator.Eq, groupType, true);
            return dal.GetList(predicate);
        }
    }
}
